import axios from './http'
// 管理员登录
export const login = (data) => {
    return axios.post('/login', data)
}

// 请求角色列表
export const getRoleList = (params) => {
    return axios.get('/roleList', { params })
}
// 获取角色总数
export const getRoleTotal = () => {
    return axios.get('/roleTotal')
}
// 新增角色
export const roleAdd = (data) => {
    return axios.put('/roleAdd', data)
}
// 更新角色
export const roleUpdate = (data) => {
    return axios.post('/roleUpdate', data)
}
// 删除角色
export const roleRemove = (id) => {
    return axios.delete('/roleRemove', { params: { id } })
}

// 请求管理员列表
export const getAdminList = (params) => {
    return axios.get('/adminList', { params })
}
// 获取角色总数
export const getAdminTotal = () => {
    return axios.get('/adminTotal')
}
// 新增管理员账号
export const adminAdd = (data) => {
    return axios.put('/adminAdd', data)
}
// 更新账号
export const adminUpdate = (data) => {
    return axios.post('/adminUpdate', data)
}

export const adminRemove = (id) => {
    return axios.delete('/adminRemove', { params: { id } })
}


// 获取菜单列表
export const getMenuList = (params) => {
    return axios.get('/menuList', { params })
}
// 新增菜单
export const menuAdd = (data) => {
    return axios.put('/menuAdd', data)
}
// 编辑菜单
export const menuUpdate = (data) => {
    return axios.post('/menuUpdate', data)
}
// 删除菜单
export const menuRemove = (id) => {
    return axios.delete('/menuRemove', { params: { id } })
}



// 获取机构列表
export const getBusinessList = (params) => {
    return axios.get('/businessList', { params })
}
// 新增机构
export const businessAdd = (data) => {
    return axios.put('/businessAdd', data)
}
// 编辑机构
export const businessUpdate = (data) => {
    return axios.post('/businessUpdate', data)
}
// 删除机构
export const businessRemove = (id) => {
    return axios.delete('/businessRemove', { params: { id } })
}
// 获取机构总数
export const getBusinessTotal = () => {
    return axios.get('/businessTotal')
}

// 获取轮播图列表
export const getBannerList = (params) => {
    return axios.get('/bannerList', { params })
}
// 新增轮播图
export const bannerAdd = (data) => {
    return axios.put('/bannerAdd', data)
}
// 编辑轮播图
export const bannerUpdate = (data) => {
    return axios.post('/bannerUpdate', data)
}
// 删除轮播图
export const bannerRemove = (id) => {
    return axios.delete('/bannerRemove', { params: { id } })
}
// 获取轮播图总数
export const getBannerTotal = (params) => {
    return axios.get('/bannerTotal', { params })
}

// 获取医生列表
export const getStaffList = (params) => {
    return axios.get('/staffList', { params })
}
// 新增医生
export const staffAdd = (data) => {
    return axios.put('/staffAdd', data)
}
// 编辑医生
export const staffUpdate = (data) => {
    return axios.post('/staffUpdate', data)
}
// 删除医生
export const staffRemove = (id) => {
    return axios.delete('/staffRemove', { params: { id } })
}
// 获取医生总数
export const getStaffTotal = (params) => {
    return axios.get('/staffTotal', { params })
}


// 获取日志列表
export const getLogList = (params) => {
    return axios.get('/logList', { params })
}
// 获取日志总数
export const getLogTotal = (params) => {
    return axios.get('/logTotal', { params })
}



